﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using QLKTX1._0.DAO;
using QLKTX1._0.DTO;

namespace QLKTX1._0.GUI
{
    public partial class FrmQLDM : Form
    {
        public FrmQLDM()
        {
            InitializeComponent();
        }

        private void groupBox1_Enter(object sender, EventArgs e)
        {

        }

        private void FrmQLDM_Load(object sender, EventArgs e)
        {
            //--------------LOAD DATAGRIDVIEW KHU-------------------------------------
            
            dataGridView1.DataSource = KhuDAO.dsKhu();
            // thay doi ten cot
            dataGridView1.Columns[0].HeaderText = "Mã Khu";
            dataGridView1.Columns[1].HeaderText = "Tên Khu";
            dataGridView1.Columns[0].Width = 165;
            dataGridView1.Columns[1].Width = 260;
            lbTSDMK.Text = "Tổng số danh mục khu là: "+KhuDAO.dsKhu().Count.ToString();
            // gan du lieu cho textbox
            txtMaKhu.DataBindings.Clear();
            txtMaKhu.DataBindings.Add("Text", dataGridView1.DataSource, "maKhu");
            txtTenKhu.DataBindings.Clear();
            txtTenKhu.DataBindings.Add("Text", dataGridView1.DataSource, "tenKhu");
            dataGridView1.Columns[0].ReadOnly = true;
            dataGridView1.Columns[1].ReadOnly = true;
            //
            txtMaKhu.Enabled = true;
            txtTenKhu.Enabled = true;
           
            this.xuLyNut(false);

           // btnLuu.Enabled = false;

            //--------------LOAD DATAGRIDVIEW TANG-------------------------------------
                        
            dtgvTang.DataSource = TangDAO.dsTang();
            // Doi ten cot sang tieng viet
            dtgvTang.Columns[0].HeaderText = "Mã Tầng";
            dtgvTang.Columns[1].HeaderText = "Tên Tầng";
            //Chinh do rong cot
            dtgvTang.Columns[0].Width = 175;
            dtgvTang.Columns[1].Width = 260;
          
            //gan du lieu len gridview
            txttMaTang.DataBindings.Clear();
            txttMaTang.DataBindings.Add("Text",dtgvTang .DataSource ,"maTang");
            txttTenTang.DataBindings.Clear();
            txttTenTang.DataBindings.Add("Text", dtgvTang.DataSource, "tenTang");
            dtgvTang.Columns[0].ReadOnly = true;
            dtgvTang.Columns[1].ReadOnly = true;
            //.............................//
            lbTSDMT.Text = "Tổng số danh mục tầng là:" + TangDAO .dsTang().Count .ToString () ;
            this.xuLyTabTang(true, true, true, false, true, true);
                     
            //--------------LOAD DATAGRIDVIEW TEN PHONG-------------------------------------

            dtgvTenPhong.DataSource = TenPhongDAO.dsTenPhong();
            // Doi ten cot sang tieng viet
            dtgvTenPhong.Columns[0].HeaderText = "Mã Tên Phòng";
            dtgvTenPhong.Columns[1].HeaderText = "Tên Phòng";
            //Chinh do rong cua cot....................
            dtgvTenPhong.Columns[0].Width = 165;
            dtgvTenPhong.Columns[1].Width = 260;
            //Cam chinh sua cot, chi doc.............
            dtgvTenPhong.Columns[0].ReadOnly = true;
            dtgvTenPhong.Columns[1].ReadOnly = true;
            //gan du lieu len gridview......................................................
            txttpMaTenPhong.DataBindings.Clear();
            txttpMaTenPhong.DataBindings.Add("Text", dtgvTenPhong.DataSource, "maTenPhong");
            txttpTenPhong.DataBindings.Clear();
            txttpTenPhong.DataBindings.Add("Text", dtgvTenPhong.DataSource, "soPhong");
           //...............................
            this.xuLyTabTenPhong(true, true, true, false, true, true);
            lbTSDMTP.Text = "Tổng số danh mục Tên Phòng là: " + TenPhongDAO.dsTenPhong().Count.ToString();


            //--------------LOAD DATAGRIDVIEW LOAI PHONG-------------------------------------

            dtgvLoaiPhong.DataSource = LoaiPhongDAO.dsLoaiPhong();
            //doi ten cot sang tieng viet--------------------------
            dtgvLoaiPhong.Columns[0].HeaderText = "Mã Loại Phòng";
            dtgvLoaiPhong.Columns[1].HeaderText = "Tên Loại Phòng";
            //Chinh do rong cua cot..............
            dtgvLoaiPhong.Columns[0].Width = 165;
            dtgvLoaiPhong.Columns[1].Width = 260;
            //Cam chinh sua cot, chi doc.............
            dtgvLoaiPhong.Columns[0].ReadOnly = true;
            dtgvLoaiPhong.Columns[1].ReadOnly = true;
            //gan du lieu len gridview...........................................................
            txtlpMaLoaiPhong.DataBindings.Clear();
            txtlpMaLoaiPhong.DataBindings.Add("Text", dtgvLoaiPhong.DataSource, "maLoaiPhong");
            txtlpTenLoaiPhong.DataBindings.Clear();
            txtlpTenLoaiPhong.DataBindings.Add("Text", dtgvLoaiPhong.DataSource, "tenLoaiPhong");
            //------------------------------------
            this.xuLyTabLoaiPhong(true, true, true, false, true, true);
            lbTSDMLP.Text = "Tổng số danh mục Loại Phòng là: " + LoaiPhongDAO.dsLoaiPhong().Count.ToString();


            //--------------LOAD DATAGRIDVIEW SO GIUONG-------------------------------------------

            dtgvSoGiuong.DataSource = SoGiuongDAO.dsSoGiuong();
            //doi ten cot sang tieng viet--------------------------
            dtgvSoGiuong.Columns[0].HeaderText = "Mã Số Giường";
            dtgvSoGiuong.Columns[1].HeaderText = "Số Giường";
            //Chinh do rong cua cot..............
            dtgvSoGiuong.Columns[0].Width = 165;
            dtgvSoGiuong.Columns[1].Width = 260;
            //Cam chinh sua cot, chi doc.............
            dtgvSoGiuong.Columns[0].ReadOnly = true;
            dtgvSoGiuong.Columns[1].ReadOnly = true;
            //gan du lieu gridview len textbox........................................
            txtsgMaSoGiuong.DataBindings.Clear();
            txtsgMaSoGiuong.DataBindings.Add("Text", dtgvSoGiuong.DataSource, "maSG");
            txtsgSoLuong.DataBindings.Clear();
            txtsgSoLuong.DataBindings.Add("Text", dtgvSoGiuong.DataSource, "soLuong");
            //------------------------------------------------
            this.xuLyTabSoGiuong(true, true, true, false, true, true);
            lbTSDMSG.Text = "Tổng số danh mục Số Giường là: " + SoGiuongDAO.dsSoGiuong().Count.ToString();


        }
        //-------------------Ham xu ly an textbox vs Button TANG ---------------------------------------
        private void xuLyTabTang(bool them, bool capnhat, bool xoa, bool luu, bool matang, bool tentang)
        {
            btntThem.Enabled = them;
            btntCapNhat.Enabled = capnhat;
            btntXoa.Enabled = xoa;
            btntLuu.Enabled = luu;
            txttMaTang.Enabled = matang;
            txttTenTang.Enabled = tentang;
        }
        //-------------------Ham xu ly an textbox vs Button TEN PHONG --------------------------------------
        private void xuLyTabTenPhong(bool them, bool capnhat, bool xoa, bool luu, bool matang, bool tentang)
        {
            btntpThem.Enabled = them;
            btntpCapNhat.Enabled = capnhat;
            btntpXoa.Enabled = xoa;
            btntpLuu.Enabled = luu;
            txttpMaTenPhong.Enabled = matang;
            txttpTenPhong.Enabled = tentang;
        }
        //-------------------Ham xu ly an textbox vs Button LOAI PHONG --------------------------------------
        private void xuLyTabLoaiPhong(bool them, bool capnhat, bool xoa, bool luu, bool matang, bool tentang)
        {
            btnlpThem.Enabled = them;
            btnlpCapNhat.Enabled = capnhat;
            btnlpXoa.Enabled = xoa;
            btnlpLuu.Enabled = luu;
            txtlpMaLoaiPhong.Enabled = matang;
            txtlpTenLoaiPhong.Enabled = tentang;
        }
        //-------------------Ham xu ly an textbox vs Button So Giuong --------------------------------------
        private void xuLyTabSoGiuong(bool them, bool capnhat, bool xoa, bool luu, bool matang, bool tentang)
        {
            btnsgThem.Enabled = them;
            btnsgCapNhat.Enabled = capnhat;
            btnsgXoa.Enabled = xoa;
            btnsgLuu.Enabled = luu;
            txtsgMaSoGiuong.Enabled = matang;
            txtsgSoLuong.Enabled = tentang;
        }

        private void xuLyNut(bool at)
        {
            
            btnLuu.Enabled = at;
        }


        //------------------------QUAN LY DANH MUC KHU---------------------------
        //*************THEM************************************
        private void btbThem_Click(object sender, EventArgs e)
        {
            if (btnThem.Text.Equals("Thêm"))
            {
                btnThem.Text = "Hủy Bỏ";
                this.xuLyNut(true);
                btnLuu.Enabled = true;
                txtMaKhu.Text = "";
                txtTenKhu.Text = "";
                btnCapNhat.Enabled = false;
                btnXoa.Enabled = false;
            }
            else
            {
                btnThem.Text = "Thêm";
                this.xuLyNut(false);
                btnCapNhat.Enabled = true;
                btnXoa.Enabled = true;
                this.FrmQLDM_Load(sender, e);
            }        
            
        }
        //*************LUU************************************
        private void btnLuu_Click(object sender, EventArgs e)
        {
            if (btnThem.Text.Equals("Hủy Bỏ"))// them
            {
                if (txtMaKhu.Text.Equals("") || txtTenKhu.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                                   
                        KhuDTO k = new KhuDTO();
                        k.MaKhu = txtMaKhu.Text;
                        k.TenKhu = txtTenKhu.Text;
                        KhuDAO.themKhu(k);
                        btnThem.Text = "Thêm";
                        this.xuLyNut(false);
                        btnCapNhat.Enabled = true;
                        btnXoa.Enabled = true;
                        this.FrmQLDM_Load(sender, e);
                    
                }
            }
            else//cap nhat
            {
                if (txtTenKhu.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    KhuDTO k = new KhuDTO();
                    k.MaKhu = txtMaKhu.Text;
                    k.TenKhu = txtTenKhu.Text;
                    KhuDAO.capNhatKhu(k);
                    btnCapNhat.Text = "Cập nhật";
                    btnThem.Enabled = true;
                    btnXoa.Enabled = true;
                    this.FrmQLDM_Load(sender, e);
                }
            }
        }
        //*************XOA************************************
        private void btnXoa_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc muốn xóa ?", "Xác nhận xóa ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                KhuDTO k = new KhuDTO();
                k.MaKhu = txtMaKhu.Text;
                k.TenKhu = txtTenKhu.Text;
                KhuDAO.xoaKhu(k);
                this.FrmQLDM_Load(sender, e);
            }
        }
        //*************CAP NHAT************************************
        private void btnCapNhat_Click(object sender, EventArgs e)
        {
            if (btnCapNhat.Text.Equals("Cập nhật"))
            {
                txtTenKhu.Enabled = true;
                btnCapNhat.Text = "Hủy Bỏ";
                btnLuu.Enabled = true;
                btnThem.Enabled = false;
                btnXoa.Enabled = false;

            }
            else
            {
                btnThem.Enabled = true;
                btnXoa.Enabled = true;
                btnCapNhat.Text = "Cập nhật";
                this.xuLyNut(false);
            }
        }

        private void tabPage2_Click(object sender, EventArgs e)
        {

        }
        //------------------------QUAN LY DANH MUC TANG-------------------------------------------------------
        private void btntThem_Click(object sender, EventArgs e)
        {
            if (btntThem.Text.Equals("Thêm"))
            {
                this.xuLyTabTang(true, false, false, true, true, true);
                txttMaTang.ReadOnly = false;
                txttTenTang.ReadOnly = false;

                txttMaTang.Text = Service.generateNoAuto("Tang", "maTang", "T", 1);
                txttTenTang.Text = "";
                btntThem.Text = "Hủy bỏ";
            }
            else
            {
                btntThem.Text = "Thêm";
                this.FrmQLDM_Load(sender, e);
            }

        }
      
        private void btntLuu_Click(object sender, EventArgs e)
        {
            if (btntThem.Text.Equals("Hủy bỏ"))
            {
                if (txttTenTang.Text.Equals("") )
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    TangDTO t = new TangDTO();
                    t.maTang = txttMaTang.Text;
                    t.TenTang = txttTenTang.Text;
                    TangDAO.themTang(t);
                    btntThem.Text = "Thêm";
                    this.FrmQLDM_Load(sender, e);
                }
            }
            else
            {
                if (txttTenTang.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    TangDTO t = new TangDTO();
                    t.maTang = txttMaTang.Text;
                    t.TenTang = txttTenTang.Text;
                    TangDAO.capNhatTang(t);
                    // huy bo
                    btntCapNhat.Text = "Cập Nhật";
                    this.FrmQLDM_Load(sender, e);
                   
                }
            }
           
        }

        private void btntCapNhat_Click(object sender, EventArgs e)
        {
            if (btntCapNhat.Text.Equals("Cập Nhật"))
            {
                this.xuLyTabTang(false, true, false, true, false, true);
                btntCapNhat.Text = "Hủy bỏ";
                txttMaTang.ReadOnly = false;
                txttTenTang.ReadOnly = false;
            }
            else
            {
                btntCapNhat.Text = "Cập Nhật";
                this.FrmQLDM_Load(sender, e);
            }
        }

        private void btntXoa_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc muốn xóa ?", "Xác nhận xóa ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                TangDTO t = new TangDTO();
                t.maTang = txttMaTang.Text;
                t.TenTang = txttTenTang.Text;
                TangDAO.xoaTang(t);
                this.FrmQLDM_Load(sender, e);
            }
        }
        //----------------*****************************************-------------------------------------
        
        //------------------------QUAN LY DANH MUC TEN PHONG---------------------------
        private void btntpThem_Click(object sender, EventArgs e)
        {
            if (btntpThem.Text.Equals("Thêm"))
            {
                this.xuLyTabTenPhong(true, false, false, true, false , true);
                txttpMaTenPhong.Text = "";
                txttpTenPhong.Text = "";
                btntpThem.Text = "Hủy bỏ";
            }
            else
            {
                btntpThem.Text = "Thêm";
                this.xuLyTabTenPhong(true, true, true, false, false , false );
                this.FrmQLDM_Load(sender, e);
            }
        }
       
        private void btntpLuu_Click(object sender, EventArgs e)
        {
            if (btntpThem.Text.Equals("Hủy bỏ"))
            {
                if (txttpTenPhong.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    
                    TenPhongDTO tp = new TenPhongDTO();                   

                    tp.SoPhong = txttpTenPhong.Text;

                    TenPhongDAO.themTenPhong(tp);

                    btntpThem.Text = "Thêm";
                    this.FrmQLDM_Load(sender, e);
                }
            }
            else
            {
                if (txttpTenPhong.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    TenPhongDTO tp = new TenPhongDTO();
                    tp.MaTenPhong = Int32.Parse(txttpMaTenPhong.Text);
                    tp.SoPhong = txttpTenPhong.Text;
                    TenPhongDAO.capNhatTenPhong(tp);
                    // huy bo
                    btntpCapNhat.Text = "Cập Nhật";
                    this.FrmQLDM_Load(sender, e);
                }
            }
        }

        private void btntpCapNhat_Click(object sender, EventArgs e)
        {
            if (btntpCapNhat.Text.Equals("Cập Nhật"))
            {
                this.xuLyTabTenPhong(false, true, false, true, false, true);
                btntpCapNhat.Text = "Hủy bỏ";
            }
            else
            {
                btntpCapNhat.Text = "Cập Nhật";
                this.FrmQLDM_Load(sender, e);
            }
        }

        private void btntpXoa_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc muốn xóa ?", "Xác nhận xóa ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                TenPhongDTO p = new TenPhongDTO();
                p.MaTenPhong = Int32.Parse (txttpMaTenPhong.Text);
                p.SoPhong = txttpTenPhong.Text;

                TenPhongDAO.xoaTenPhong(p);
                
                this.FrmQLDM_Load(sender, e);
            }
        }
        //------------------------QUAN LY DANH MUC LOAI PHONG---------------------------
        //*************THEM*************************************
        private void btnlpThem_Click(object sender, EventArgs e)
        {
            if (btnlpThem.Text.Equals("Thêm"))
            {
                this.xuLyTabLoaiPhong(true, false, false, true, true , true);
                txtlpMaLoaiPhong.Text = "";
                txtlpTenLoaiPhong.Text = "";
                btnlpThem.Text = "Hủy bỏ";
            }
            else
            {
                btnlpThem.Text = "Thêm";
                this.xuLyTabTenPhong(true, true, true, false, false, false);
                this.FrmQLDM_Load(sender, e);
            }

        }
        //*************CAP NHAT************************************
        private void btnlpCapNhat_Click(object sender, EventArgs e)
        {
            if (btnlpCapNhat.Text.Equals("Cập Nhật"))
            {
                this.xuLyTabLoaiPhong(false, true, false, true, false, true);
                btnlpCapNhat.Text = "Hủy bỏ";
            }
            else
            {
                btnlpCapNhat.Text = "Cập Nhật";
                this.FrmQLDM_Load(sender, e);
            }
        }
        //*************XOA*************************************
        private void btnlpXoa_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc muốn xóa ?", "Xác nhận xóa ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                LoaiPhongDTO lp = new LoaiPhongDTO();

                lp.MaLoaiPhong = txtlpMaLoaiPhong.Text;
                lp.TenLoaiPhong = txtlpTenLoaiPhong.Text;
                LoaiPhongDAO.xoaLoaiPhong(lp);
                this.FrmQLDM_Load(sender, e);
            }
        }
        //*************LUU*************************************
        private void btnlpLuu_Click(object sender, EventArgs e)
        {
            if (btnlpThem.Text.Equals("Hủy bỏ"))
            {
                if (txtlpMaLoaiPhong.Text.Equals("") || txtlpTenLoaiPhong.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    LoaiPhongDTO lp = new LoaiPhongDTO();

                    lp.MaLoaiPhong = txtlpMaLoaiPhong.Text;
                    lp.TenLoaiPhong = txtlpTenLoaiPhong.Text;

                    LoaiPhongDAO.themLoaiPhong(lp );
                    btnlpThem.Text = "Thêm";
                    this.FrmQLDM_Load(sender, e);
                }
            }
            else
            {
                if (txtlpMaLoaiPhong.Text.Equals("") || txtlpTenLoaiPhong.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    LoaiPhongDTO lp = new LoaiPhongDTO();

                    lp.MaLoaiPhong = txtlpMaLoaiPhong.Text;
                    lp.TenLoaiPhong = txtlpTenLoaiPhong.Text;
                    LoaiPhongDAO.capNhatLoaiPhong(lp);
                    // huy bo
                    btnlpCapNhat.Text = "Cập Nhật";

                    this.FrmQLDM_Load(sender, e);
                }
            }
        }


        //------------------------QUAN LY DANH MUC SO GIUONG---------------------------
        private void btnsgThem_Click(object sender, EventArgs e)
        {
            if (btnsgThem.Text.Equals("Thêm"))
            {
                this.xuLyTabSoGiuong(true, false, false, true, true, true);
                txtsgMaSoGiuong.Text = "";
                txtsgSoLuong.Text = "";
                btnsgThem.Text = "Hủy bỏ";
            }
            else
            {
                btnsgThem.Text = "Thêm";
                this.xuLyTabSoGiuong(true, true, true, false, false, false);
                this.FrmQLDM_Load(sender, e);
            }
        }

        private void btnsgCapNhat_Click(object sender, EventArgs e)
        {
            if (btnsgCapNhat.Text.Equals("Cập Nhật"))
            {
                this.xuLyTabSoGiuong(false, true, false, true, false, true);
                btnsgCapNhat.Text = "Hủy bỏ";
            }
            else
            {
                btnsgCapNhat.Text = "Cập Nhật";
                this.FrmQLDM_Load(sender, e);
            }
        }

        private void btnsgXoa_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Bạn có chắc muốn xóa ?", "Xác nhận xóa ", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                SoGiuongDTO sg = new SoGiuongDTO();
                sg.MaSG = txtsgMaSoGiuong.Text;
                sg.SoLuong = Int32.Parse(txtsgSoLuong.Text);

                SoGiuongDAO.xoaSoGiuong(sg);
                
                this.FrmQLDM_Load(sender, e);
            }
        }

        private void btnsgLuu_Click(object sender, EventArgs e)
        {
            if (btnsgThem.Text.Equals("Hủy bỏ"))
            {
                if (txtsgMaSoGiuong.Text.Equals("") || txtsgSoLuong.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {                    
                    SoGiuongDTO sg = new SoGiuongDTO();                   
                    sg.MaSG = txtsgMaSoGiuong.Text;
                    sg.SoLuong = Int32.Parse (txtsgSoLuong.Text);

                    SoGiuongDAO.themSoGiuong(sg);
                    
                    btnsgThem.Text = "Thêm";
                    this.FrmQLDM_Load(sender, e);
                }
            }
            else
            {
                if (txtsgMaSoGiuong.Text.Equals("") || txtsgSoLuong.Text.Equals(""))
                {
                    MessageBox.Show("Vui lòng nhập dữ liệu", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    SoGiuongDTO sg = new SoGiuongDTO();
                    sg.MaSG = txtsgMaSoGiuong.Text;
                    sg.SoLuong = Int32.Parse(txtsgSoLuong.Text);
                    
                    SoGiuongDAO.capNhatSoGiuong(sg );
                   
                    btnsgCapNhat.Text = "Cập Nhật";
                    this.FrmQLDM_Load(sender, e);
                }
            }
        }

        private void lbTSDMK_Click(object sender, EventArgs e)
        {

        }

        private void lbTSDMT_Click(object sender, EventArgs e)
        {

        }
        //--------------------**************************----------------------------------
    }
}
